﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HoldemManagerDAL.DTO;

namespace HoldemManager_CurrentStats_Viewer.Test
{
    public partial class Form1 : Form
    {
        private HoldemManagerDAL.EFEntity entity = new HoldemManagerDAL.EFEntity();
        //const string cstring = "Server=127.0.0.1;Port=5432;Database=HOLDEM_MANAGER;User Id=postgres;Password=2203ss;";
        public Form1()
        {
            InitializeComponent();


            entity = new HoldemManagerDAL.EFEntity();

            //Test1();
            //Test2();
            Test3();

        }

        private void btntest1_Click(object sender, EventArgs e)
        {
            Test3();
        }


        private void Test1()
        {

           



        }

        private void Test2()
        {
            

            //List<HoldemManagerDAL.players> player = entity.players.Where(h => h.cashhands > 200).OrderByDescending(p => p.cashhands).ToList();

            //List<HoldemManagerDAL.playervsplayer> pp = entity.playervsplayer.Take(100).ToList();

        }

        private void Test3()
        {


            //les sites
            //List<HoldemManagerDAL.DTO.pokersites>  sites = entity.GetPokerSites();

            //le sit PS
            HoldemManagerDAL.DTO.pokersites ps = entity.GetPokerSite(HoldemManagerDAL.EFEntity.PokerSitesAbrev.PS);

            //liste des main actives
            //List<HoldemManagerDAL.pokerhands> list = entity.GetActiveHands(ps.site_id);
            
            //liste des tables actives
            List<HoldemManagerDAL.DTO.tables> tables = entity.GetActiveTables(ps.site_id);

        }


    }
}
